import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    name: "Firstpage",
    path: "/",
    component: () => import('@/views/Firstpage.vue'),
    children: [
      {
        path: 'shouye',
        name: "Shouye",
        component: () => import('../components/Shouye.vue'),
      },
      {
        path: 'databoss',
        name: "Databoss",
        component: () => import('../components/Databoss.vue'),
      },
      {
        path: 'ask',
        name: "Ask",
        component: () => import('../components/Ask.vue'),
      },
      {
        path: 'experience',
        name: "Experience",
        component: () => import('../components/Experience.vue'),
      },
      {
        path: 'maintain',
        name: "Maintain",
        component: () => import('../components/Maintain.vue'),
      },
    ]
  },
  {
    path: '/select',
    name: "Select",
    component: () => import('../components/Select.vue'),
    children: [
      {
        path: 'primary',
        name: "Primary",
        component: () => import('../components/Primary.vue'),
      },
      {
        path: 'intermediate2',
        name: "Intermediate2",
        component: () => import('../components/Intermediate2.vue'),
      },
      {
        path: 'intermediate',
        name: "Intermediate",
        component: () => import('../components/Intermediate.vue'),
        children: [
          {
            path: 'selectchild',
            name: "Selectchild",
            component: () => import('../components/Selectchild.vue'),
          },
        ]
      },
      {
        path: 'Senior',
        name: "Senior",
        component: () => import('../components/Senior.vue'),
      },
    ]
  },
  {
    path: '/login',
    name: 'Login',
    component: () => import('../pages/Login.vue'),
    children: [
      {
        path: 'password',
        name: 'Password',
        component: () => import('../components/Password.vue'),
      },
      {
        path: 'mail',
        name: 'Mail',
        component: () => import('../components/Mail.vue'),
      },
    ]
  },
  // {
  //   path: '/hierarchy',
  //   name: 'Hierarchy',
  //   component: () => import('../components/Hierarchy.vue'),
  //   children: [
  //     {
  //       path: 'selectchild',
  //       name: "Selectchild",
  //       component: () => import('../components/Selectchild.vue'),
  //     },
  //   ]
  // },

]

const router = new VueRouter({
  routes
})

export default router
